<table class="table table-hover table-striped">
    <thead>
        <tr>
            <th>Email</th>
            <th>Rating</th>
            <th>Message</th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        {% for review in publication.reviews.all %}
        <tr>
            <td>{{ review.user.username }}</td>
            <td>
                {% if review.marks == 0 %}
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                {% elif review.marks == 1 %}
                <i class="fa fa-star"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                {% elif review.marks == 2 %}
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                {% elif review.marks == 3 %}
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star-o"></i>
                <i class="fa fa-star-o"></i>
                {% elif review.marks == 4 %}
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star-o"></i>
                {% elif review.marks == 5 %}
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                <i class="fa fa-star"></i>
                {% else %}
                {% endif %}
            </td>
            <td>{{ review.text }}</td>
            <td>
                {% if review.user = user %}
                <button onclick="ajax_delete_peer_review({{ review.review_id }});"
                    style="float: right;"
                    type="button"
                    class="btn btn-xs btn-danger"><i class="fa fa-minus"></i> Delete
                </button>
                {% endif %}
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>